<table class="statistike drop" cellspacing="0" cellpadding="0" border="1" width="650" style="border-collapse: collapse; empty-cells: show;">

  <tr>
    <th>Predmet</th>
    <th>Grafički prikaz</th>
    <th>Prosek</th>
    <th>Br. ocena</th>
  </tr>

  <?php
  foreach($predmets as $predmet_id => $naziv)
  {
     if(isset($ocenas[$predmet_id]))
        list($prosek, $broj) = $ocenas[$predmet_id];
     else list($prosek, $broj) = array(0, 0);
  ?>
  <tr>
    <td class="predmet"><?php echo $naziv ?></td>
    <td class="graf"><img src="/images/graf.png" height="18" width="<?php echo $prosek / 5 * 100 ?>%" /></td>
    <td><?php echo $prosek ?></td>
    <td><?php echo $broj ?></td>
  </tr>
<?php }?>
</table>